//
//  Created by Huly-Gun Megatron on 10/3/09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//
#ifndef shashka_h
#define shashka_h

//#import "vars.h"

class Shashka {
public:	
	
	int num;
	int stype;
	int flag;
	//float x1,y1;
	float vx, vy;
	
public:
	
	long entity;
	
	Shashka(int _type = 1, float x = 0, float y = 0,long _ent=0);
	~Shashka();
	
	//float getXMove(){return xEntityX(entity,true)-x1;}
	//float getYMove(){return xEntityY(entity,true)-y1;}
	float getRMove(){return sqrt(vx*vx+vy*vy);}
	void normalyzeMove(float f = 2.9);
	//void setXMove(float dx){x1 = xEntityX(entity,true) - dx;}
	//void setYMove(float dy){y1 = xEntityY(entity,true) - dy;}
	
	void setYMoveFromTouch(float y){vy = xEntityY(entity,true) - y;}
	void setXMoveFromTouch(float x){vx = xEntityX(entity,true) - x;}	
	
	float getDistance(Shashka* sh);
	bool activate(bool act = true);
	bool stepMove();
	
};

#endif
